import { resolve } from 'path'
import { defineConfig } from 'electron-vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
  main: {
    entry: 'src/main/index.js',
  },
  preload: {
    build: {
      lib: {
        entry: resolve(__dirname, 'src/main/preload.js')
      }
    }
  },
  renderer: {
    resolve: {
      alias: {
        '@renderer': resolve(__dirname, 'src/renderer'),
        '@components': resolve(__dirname, 'src/renderer/components'),
        '@views': resolve(__dirname, 'src/renderer/views'),
        '@store': resolve(__dirname, 'src/renderer/store'),
		'@router': resolve(__dirname, 'src/renderer/router'),
        '@api': resolve(__dirname, 'src/renderer/api'),
      }
    },
    plugins: [vue()]
  }
})